package com.example.common.enums;

/**
 * @Author wxy
 * @Date 2021/2/4 15:48
 * @Version 1.0
 */
public enum SystemStatus {

    UN_PAY(1, "未付款"),
    PAY(2, "已付款"),
    CANCEL(3, "取消"),
    ;

    private final Integer value;
    private final String description;

    SystemStatus(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public Integer getName() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static String valueToDesc(Integer value) {
        if (value == 1) {
            return UN_PAY.getDescription();
        } else if (value == 2) {
            return PAY.getDescription();
        }
        return null;
    }
}
